package com.thinkgem.jeesite.modules.cms.service;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.cms.dao.Record_summaryDao;
import com.thinkgem.jeesite.modules.cms.entity.Record_summary;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly=true)
public class RecordService_summary
  extends CrudService<Record_summaryDao, Record_summary>
{
  @Transactional(readOnly=false)
  public Page<Record_summary> findPage(Page<Record_summary> page, Record_summary record, boolean isDataScopeFilter)
  {
    return super.findPage(page, record);
  }
  
  @Transactional(readOnly=false)
  public void save(Record_summary record)
  {
    if (StringUtils.isBlank(record.getId()))
    {
      record.preInsert();
      ((Record_summaryDao)this.dao).insert(record);
    }
    else
    {
      record.preUpdate();
      ((Record_summaryDao)this.dao).update(record);
    }
  }
  
  @Transactional(readOnly=false)
  public void delete(Record_summary record, Boolean isRe)
  {
    super.delete(record);
  }
}
